<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>SoundPan</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">SoundPan()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#3A3966"><b>SoundPan</b></font>(#Sound, Pan [, Channel])</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Sets the new pan value, in real-time, for the #Sound. The pan value is saved for the #Sound, so it's not 
needed to call it every time. The panning is a way to play a sound on a stereo equipment. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Sound</i></td>
<td width="90%"> 
 
The sound to use. 

 

</td></tr>
<tr><td><i>Pan</i></td>
<td> 
 
The new pan value. Valid values are from -100 (full left) to 100 (full right). 
If the pan value is zero, then the sound is played on right and left speaker, equally. 

 

</td></tr>
<tr><td><i>Channel (optional)</i></td>
<td> 
 
The channel to use. It's the value returned by <a href="playsound.html">PlaySound()</a> when using the 
<font color="#924B72">#PB_Sound_MultiChannel</font> flag. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>
无.


</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2"><font color="#3A3966"> InitSound</font>()           <font color="#3A3966">; Initialize Sound system</font>
<font color="#3A3966"> UseOGGSoundDecoder</font>()  <font color="#3A3966">; Use ogg files</font>

 <font color="#3A3966">; Loads a sound from a file</font>
<font color="#3A3966"> LoadSound</font>(0, <font color="#924B72">#PB_Compiler_Home</font> +"Examples\3D\Data\Siren.ogg")
 <font color="#3A3966">; The sound is playing</font>
<font color="#3A3966"> PlaySound</font>(0, <font color="#924B72">#PB_Sound_Loop</font>, 20)

<font color="#3A3966"> MessageRequester</font>("Info", "The sound is playing in stereo.")
 
<font color="#3A3966"> SoundPan</font>(0, -100)
<font color="#3A3966"> MessageRequester</font>("Info", "The sound is playing only on the left channel.")
 
<font color="#3A3966"> SoundPan</font>(0, 100)
<font color="#3A3966"> MessageRequester</font>("Info", "The sound is playing only on the right channel.")
 
<font color="#3A3966"> SoundPan</font>(0, 0)
<font color="#3A3966"> MessageRequester</font>("Info", "The sound is playing in stereo.")
 
<font color="#3A3966"> FreeSound</font>(0) <font color="#3A3966">; The sound is freed</font>
 <b><font color="#3A3966">End</font></b>
</font></pre>

</Blockquote><p><b>已支持操作系统 </b><Blockquote>Windows, MacOS X</Blockquote></p><center>&lt;- <a href=soundlength.html>SoundLength()</a> - <a href="index.html">Sound Index</a> - <a href="soundstatus.html">SoundStatus()</a> -&gt;<br><br>

</body></html>